<?php
/**
 * Created by PHPStorm
 * User: xiest
 * Date: 2021/4/19
 * Email: <939369942@qq.com>
 */
namespace basic\jobs;
use basic\services\AliyunSmsService;
use basic\services\SmsService;
use think\Exception;
use think\facade\Log;
use think\queue\Job;

class SendMsmJob
{
    public function fire(Job $job,$data)
    {
        try{
            SmsService::create()->sendMessage(['']);
            $job->delete();
        }catch (\Exception $e){
            Log::error($e->getMessage());
        }
    }

    public function failed($data)
    {
        // ...任务达到最大重试次数后，失败了
    }
}